﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WodLib
{
    [Serializable()]
    [System.ComponentModel.TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
    public class HumanSkills : ICloneable
    {
        public Skill Academics { get; set; }
        public Skill Computer { get; set; }
        public Skill Crafts { get; set; }
        public Skill Investigation { get; set; }
        public Skill Medicine { get; set; }
        public Skill Occult { get; set; }
        public Skill Politics { get; set; }
        public Skill Science { get; set; }

        public Skill Athletics { get; set; }
        public Skill Brawl { get; set; }
        public Skill Drive { get; set; }
        public Skill Firearms { get; set; }
        public Skill Larceny { get; set; }
        public Skill Stealth { get; set; }
        public Skill Survival { get; set; }
        public Skill Weaponry { get; set; }

        public Skill AnimalKen { get; set; }
        public Skill Empathy { get; set; }
        public Skill Expression { get; set; }
        public Skill Intimidation { get; set; }
        public Skill Persuation { get; set; }
        public Skill Socialize { get; set; }
        public Skill Streetwise { get; set; }
        public Skill Subterfuge { get; set; }

        public HumanSkills()
        {
            #region Mental skills
            Academics = new Skill(TraitType.Mental);

            Computer = new Skill(TraitType.Mental);

            Crafts = new Skill(TraitType.Mental);

            Investigation = new Skill(TraitType.Mental);

            Medicine = new Skill(TraitType.Mental);

            Occult = new Skill(TraitType.Mental);

            Politics = new Skill(TraitType.Mental);

            Science = new Skill(TraitType.Mental);

            #endregion
            #region Physical skills
            Athletics = new Skill(TraitType.Physical);
            Brawl = new Skill(TraitType.Physical);
            Drive = new Skill(TraitType.Physical);
            Firearms = new Skill(TraitType.Physical);
            Larceny = new Skill(TraitType.Physical);
            Stealth = new Skill(TraitType.Physical);
            Survival = new Skill(TraitType.Physical);
            Weaponry = new Skill(TraitType.Physical);
            #endregion
            #region Social skills
            AnimalKen = new Skill(TraitType.Social);
            Empathy = new Skill(TraitType.Social);
            Expression = new Skill(TraitType.Social);
            Intimidation = new Skill(TraitType.Social);
            Persuation = new Skill(TraitType.Social);
            Socialize = new Skill(TraitType.Social);
            Streetwise = new Skill(TraitType.Social);
            Subterfuge = new Skill(TraitType.Social);
            #endregion
        }

        #region ICloneable Members

        public object Clone()
        {
            HumanSkills tmp = (HumanSkills)this.MemberwiseClone();

            Type tp = this.GetType();
            System.Reflection.PropertyInfo[] props = tp.GetProperties();
            foreach (var item in props)
            {
                item.SetValue(tmp,
                    ((ICloneable)item.GetValue(this, null)).Clone(), null);
            }
            return tmp;
        }

        #endregion
    }
}
